package com.fy.admin.api;


import com.fy.admin.dto.ScenicDto;
import com.fy.common.api.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/scenic")
@Api(tags="景区管理")
@RefreshScope
public class ScenicManagementController {
    @ApiOperation("查询所有")
    @GetMapping(value = "/findAll/{pageSize}/{limit}")
    public CommonResult findAll(@PathVariable Integer pageSize, @PathVariable Integer limit)
    {
        List<ScenicDto> list = null;
        return CommonResult.success(list);
    }

    @ApiOperation("添加景区")
    @PostMapping(value = "/add")
    public CommonResult add(@RequestBody ScenicDto scenicVo)
    {
        return CommonResult.success();
    }
    @ApiOperation("编辑景区")
    @PostMapping(value = "/edit")
    public CommonResult edit(@RequestBody ScenicDto scenicVo)
    {
        return CommonResult.success();
    }
    @ApiOperation("删除景区")
    @DeleteMapping(value = "/delete/{id}")
    public CommonResult delete(@PathVariable Integer id)
    {
        return CommonResult.success();
    }
    @ApiOperation("根据景区ID查询")
    @GetMapping(value = "/findById/{id}")
    public CommonResult findById(@PathVariable Integer id)
    {
        List<ScenicDto> list = null;
        return CommonResult.success(new ScenicDto());
    }
}
